package Com.CXSH.Guanwan.service.serviceImpl;
import Com.CXSH.Guanwan.Mapper.UserMapper;
import Com.CXSH.Guanwan.pojo.User;
import Com.CXSH.Guanwan.service.loginService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class LoginServiceImpl extends ServiceImpl<UserMapper,User> implements loginService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public User getUserByPass(String username, String password) {
        QueryWrapper<User> wrappe = new QueryWrapper<>();
        wrappe.eq("username",username).eq("password",password);
        User user = userMapper.selectOne(wrappe);
        return user;
    }
}
